<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Javascript脚本工作方式示例</title>
    <script src="./js01_base.js" async></script>
</head>
<body>
    <h1 id="page_title">Javascript脚本工作方式示例</h1>

    <script>
        document.addEventListener("DOMContentLoaded",function(){
            let h1=document.getElementById("page_title");
            alert("DOM树加载完成后执行。"+h1.textContent);
        });
    </script>
    <script>
        console.log("内部JavaScript脚本");
        alert("内部JavaScript脚本");
    </script>

    <button onclick="alert('内联JavaScrript脚本')">执行内联JavaScript脚本</button>
</body>
</html>